Skip to content

refactor: rename automatic -> auto enums type values to align between platforms - #3328

Closed
kkafar wants to merge 7 commits into
mainfrom
@kkafar/align-prop-naming-auto
Closed

kkafar wants to merge 7 commits into
mainfrom
@kkafar/align-prop-naming-auto

Conversation

@kkafar

@kkafar kkafar commented Oct 22, 2025 •

Copy link
Copy Markdown
Member

Description

This PR aligns property naming in "gamma" components between platforms. Indeed it does not make sense to have part of the enum values called auto and part automatic, e.g. TabBarMinimizeBehavior::automatic & TabBarItemLabelVisibilityMode::auto.
Since these are new APIs we can have it nicely aligned on stable release.

I've decided to go with auto in favour of automatic because it is shorter and clearly conveys the meaning.

To be honest I can't decide. There is no consistency neither in the world nor in our API.
I've done a quick research and we have in react-native-screens:

  • TabBarItemLabelVisibilityMode::auto (Android, not-yet-stable API)
  • ScreenProps::statusBarStyle::auto (Android, iOS, stable API)
  • TabBarControllerMode::automatic (iOS, not-yet-stable API)
  • TabBarMinimizeBehavior::automatic (iOS, not-yet-stable API)
  • ScrollEdgeEffect::automatic (iOS, stable API)
  • SearchBarPlacement::automatic (iOS, stable API)
  • SplitBehavior::automatic (iOS, not-yet-stable API)
  • SplitDisplayMode::automatic (iOS, not-yet-stable API)
  • SplitDisplayModeButtonVisibility::automatic (iOS, not-yet-stable API)

Then in react-native:

  • ScrollView::overScrollMode::auto (Android, RN API)
  • Image::resizeMethod::auto (Android, RN API)
  • TextInput::importantForAutoFill::auto (Android, RN API)
  • View::importantForAccessibility::auto (Android, RN API)
  • View::pointerEvents::auto (RN API)
  • All the layout props in RN use auto
  • All the test style props in RN use auto
  • All the view style props in RN use auto
  • ScrollView::contentInsetAdjustmentBehavior::automatic (ScrollView public API)

Additionally many iOS props such as ScrollView::automaticallyAdjustContentInsets use the automatic.

The dividing line here is clearly the platform.
And it seems that the convention in react-native is to stick to the platform conventions.

Changes

This PR renames exactly:

  • TabBarMinimizeBehavior::automatic -> TabBarMinimizeBehavior::auto
  • TabBarControllerMode::automatic -> TabBarControllerMode::auto
  • Rename automatic -> auto to align between platforms
  • Update Test3236
  • Update types docs
  • Fix more tests

Test code and steps to reproduce

Checklist

  • Included code example that can be used to test this change
  • Ensured that CI passes

@kkafar
kkafar marked this pull request as draft October 22, 2025 13:39
@kkafar
kkafar force-pushed the @kkafar/align-prop-naming-auto branch from 3013eb4 to 446da5d Compare January 16, 2026 12:43
@kkafar

kkafar commented Jan 20, 2026

Copy link
Copy Markdown
Member Author

It stays as is screens for now.

@kkafar kkafar closed this Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant